package com.toy.utils;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class BaseResult<T> {

    private static final  Log log = LogFactory.getLog(BaseResult.class);
    private  String errorCode ;
    private Boolean success = false;
    private String errorMsg;
    private T module;

    public BaseResult(T module){
        success = true;
        this.module = module;
    }

    public BaseResult(String errorCode,String errorMsg) {
        success = false;
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        log.error(errorMsg);
    }

    public String getErrorMsg() {
        return  errorMsg;
    }

    public T getModule () {
        return  module;
    }

    public Boolean getSuccess() {
        return  success;
    }



}
